We begin with
library(network)
## Warning: package 'network' was built under R version 3.6.3
## network: Classes for Relational Data
## Version 1.16.0 created on 2019-11-30.
## copyright (c) 2005, Carter T. Butts, University of California-Irvine
## Mark S. Handcock, University of California -- Los Angeles
## David R. Hunter, Penn State University
## Martina Morris, University of Washington
## Skye Bender-deMoll, University of Washington
## For citation information, type citation("network").
## Type help("network-package") to get started.
library(igraphdata)
## Warning: package 'igraphdata' was built under R version 3.6.3
library(igraph)
## Warning: package 'igraph' was built under R version 3.6.3
##
## Attaching package: 'igraph'
## The following objects are masked from 'package:network':
##
## %c%, %s%, add.edges, add.vertices, delete.edges, delete.vertices,
## get.edge.attribute, get.edges, get.vertex.attribute, is.bipartite,
## is.directed, list.edge.attributes, list.vertex.attributes,
## set.edge.attribute, set.vertex.attribute
## The following objects are masked from 'package:stats':
##
## decompose, spectrum
## The following object is masked from 'package:base':
##
## union
library(GGally)
## Loading required package: ggplot2
## Registered S3 method overwritten by 'GGally':
## method from
## +.gg ggplot2
library(ape)
## Warning: package 'ape' was built under R version 3.6.3
##
## Attaching package: 'ape'
## The following objects are masked from 'package:igraph':
##
## edges, mst, ring
library(ggraph)
## Warning: package 'ggraph' was built under R version 3.6.3
data(yeast)
ghrg <- fit_hrg(yeast)
ggraph(ghrg,layout="lgl")+
geom_edge_link(width=0.2,colour="grey")+
geom_node_point(col="black",size=0.3)+
theme_graph()
ggraph(ghrg, layout = 'dendrogram', circular = FALSE) +
geom_edge_link() +
geom_node_point(color="#69b3a2", size=3) +
geom_node_text(aes( label=name, filter=leaf), angle=0, hjust=1, nudge_y=-0.1) +
geom_node_point(aes(filter=leaf) , alpha=0.6) + ylim(-.6, NA) +
theme(legend.position="none")+
coord_flip() +
scale_y_reverse()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.